package com.itheima.Advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

//@Aspect
//当前切面类
@Component
//通知类
public class MyAdvice {
    //切入点
    @Pointcut("execution(void com.itheima.dao.BookDao.save())")
    private void pt() {
    }

    //前置通知
    @Before("pt()")
    public void method() {
        System.out.println("当前时间为" + System.currentTimeMillis());
    }

}
